package com.shine.rabbitmq.config;

import com.shine.rabbitmq.converter.FastJsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMessageConfig {

    @Bean
    public MessageConverter messageConverter() {
//        // 使用 JSON 转换器
//        return new Jackson2JsonMessageConverter();
        // 使用 fastjson2 转换器
        return new FastJsonMessageConverter();
    }

}
